// 登录设置
export default{
	data(){
		return {
			code:''
		}
	},
	onShow() {
		uni.login({
			success: ({code}) => {
				this.code = code;
			}
		})
	},
	methods:{
		getUserInfo(){
			if(detail.errMsg.indexOf('fail')!=-1){
				this.$u.route({
					url:'/pagesA/login/login'
				})
				return false;
			}
			detail.code = this.code;
			this.$store.dispatch("setLogin",detail).then(res=>{
				this.callback&&this.callback()
			}) //登录
		},
	}
}